home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / LIBRARY.DOC < prev    next >
Text File  |  1993-05-04  |  51KB  |  1,407 lines

  1.  
  2.  
  3.                                 LIBRARY REFERENCE
  4.                                 -----------------
  5.  
  6.      The library files contain standard routines that can be used in most
  7.      WASM programs.  The files consist of source code that is included into
  8.      the target program.  The routines may be examined and modified.
  9.  
  10.      The files should be included near the start of the program, with no
  11.      code or data before the INCLUDE statements.  Many of the files have
  12.      start-up code that must be executed, so do NOT branch around the
  13.      INCLUDE statements.  EQUates may be defined before the include
  14.      statements.
  15.  
  16.      The registers DS, ES, and SS should be set to the initial code/data
  17.      segment.  These registers may be modified as long as their original
  18.      values are restored before calling any library functions.
  19.  
  20.      The registers DI, SI, DS, ES, and BP are always preserved.  The
  21.      direction flag (as set by the CLD and STD instructions) is NOT
  22.      preserved.  You should always explicitly set the direction before
  23.      using any 80x86 string instructions (CMPSB, CMPSW, LODSB, LODSW,
  24.      MOVSB, MOVSW, STOSB, or STOSW)
  25.  
  26.      Parameters are passed to and from the routines in registers. The
  27.      register usage is documented in the library files at the start of each
  28.      routine in the comments.  Unless stated otherwise, all addresses
  29.      passed are 16 bit offsets into the data segment.  Strings are defined
  30.      as a sequence of bytes terminated by an ASCII code 0 (these type of
  31.      strings are called ASCIIZ strings).
  32.  
  33.      Routines that access the system usually return a DOS error code if the
  34.      system call fails.  Success and failure return values are documented
  35.      in the library files.
  36.  
  37.      Several of the library files require code or data in other library
  38.      files.  These dependencies are documented in the Library Files section
  39.      and at the start of each library file in the comments.  Note that
  40.      required library files may require additional library files, for
  41.      instance all library files that require CONVERT.ASM will also require
  42.      CASE1.ASM (because CONVERT.ASM requires CASE1.ASM).
  43.  
  44.                                 LIBRARY OVERVIEW
  45.                                 ----------------
  46.  
  47.      The file START.ASM provides start up code for standard COM programs.
  48.      Many of the other library files require that this file be INCLUDEd.
  49.  
  50.      A program's command line parameters can be accessed with the routines
  51.      in the file PARMS.ASM.  The environment strings can accessed with the
  52.      routines in ENVIRO.ASM.  Interrupt vectors can be set and retrieved
  53.      with the routines in INTR.ASM.
  54.  
  55.      Memory can be allocated from two separate sources.  The file
  56.      MEMORY.ASM provides routines for allocating large chunks of memory
  57.      from the system.  The file STACK.ASM provides two macros for
  58.      allocating small blocks of temporary memory from the stack.
  59.  
  60.      Direct keyboard i/o is performed using the routines in the file
  61.  
  62.  
  63.      KEYBRD.ASM.  The state of the shift keys can be read using the routine
  64.      in the file SHIFT.ASM.  String and other types of input routines are
  65.      available in the file INPUT.ASM.
  66.  
  67.      The files MESSAGE1.ASM and MESSAGE2.ASM provide simple TTY output.
  68.      Direct full screen video output is available through the files
  69.      VIDEO1.ASM to VIDEO9.ASM and DRAW1.ASM.  The file PROMPT.ASM provides
  70.      a few special purpose output routines used by INPUT.ASM.
  71.  
  72.      The file FILE.ASM provides direct DOS file access for reading and
  73.      writing to files.  The files BUFFER1.ASM through BUFFER4.ASM provide a
  74.      buffered file i/o system.  Use buffered i/o if you wish to read or
  75.      write file information one byte at a time.
  76.  
  77.      The serial ports can be accessed by using the files SERIAL1.ASM to
  78.      SERIAL9.ASM.  Routines for performing xmodem file transfers are
  79.      available in the files XMODEM1.ASM and XMODEM2.ASM.
  80.  
  81.      The routines in SOUND.ASM allow the speaker to be turned on and off at
  82.      specific frequencies.
  83.  
  84.      You can execute other programs from within your WASM program by using
  85.      the the file SHELL1.ASM.  You can run a secondary command processor
  86.      (i.e., a DOS shell) with the file SHELL2.ASM.
  87.  
  88.      The files CASE1.ASM and CASE2.ASM provide routines to change the case
  89.      of characters and strings.  The file CONVERT.ASM provides routines to
  90.      convert between strings and numbers.  The files STRING.ASM and
  91.      STRINGF.ASM provide general purpose string manipulation routines.  The
  92.      files JUSTIFY1.ASM and JUSTIFY2.ASM define routines to insert
  93.      characters into a string.
  94.  
  95.      Various checksum calculations can be performed using the routines in
  96.      CHECK1.ASM to CHECK4.ASM.  Random numbers can be generated with the
  97.      routines in RANDOM.ASM.
  98.  
  99.      The routines in TICKS.ASM measure the passage of time in "ticks," a
  100.      ROM system of time measurement.
  101.  
  102.      The routines in TSR1.ASM to TSR2.ASM simplify the task of writing
  103.      TSR's.
  104.  
  105.      A Fourth-like macro language can be added to an application with the
  106.      routines in MACRO1.ASM.  The file MACRO2.ASM provides some additional
  107.      macro support routines.
  108.  
  109.                                   LIBRARY FILES
  110.                                   -------------
  111.  
  112.      BUFFER1.ASM
  113.  
  114.        Defines:
  115.  
  116.          BufAll              allocate a buffer
  117.          BufRel              release a buffer
  118.          BufOpn              open a buffer file
  119.          BufClo              close a buffer file
  120.  
  121.  
  122.  
  123.          BUFFER_RECORD       bytes in a buffer record
  124.  
  125.          BUFFER_READ         open buffered file for reading
  126.          BUFFER_WRITE        open buffered file for writing
  127.          BUFFER_CREATE       create or truncate buffered file
  128.  
  129.        Requires:
  130.  
  131.          FILE.ASM
  132.          MEMORY.ASM
  133.  
  134.        The routines in this file allocate, deallocate, open, and close
  135.        buffers.  All buffer i/o is performed through a buffer record.  The
  136.        buffer record must exist in the current data segment (usually
  137.        declared or allocated using the StkAll macro).  The actual buffer is
  138.        allocated from the system by BufAll.  A buffer must be allocated and
  139.        then opened before it can be read from or written to.
  140.  
  141.      BUFFER2.ASM
  142.  
  143.        Defines:
  144.  
  145.          GetByt              read a buffer byte
  146.          BufGet              read an entire buffer
  147.  
  148.        Requires:
  149.  
  150.          BUFFER1.ASM
  151.          FILE.ASM
  152.  
  153.        The routines in this file are for reading from a buffered file.  The
  154.        routine BufGet is used internally by GetByt when the buffer is
  155.        empty.
  156.  
  157.      BUFFER3.ASM
  158.  
  159.        Defines:
  160.  
  161.          PutByt              write a buffer byte
  162.          BufPut              write an entire buffer
  163.  
  164.        Requires:
  165.  
  166.          BUFFER1.ASM
  167.          FILE.ASM
  168.  
  169.        The routines in this file are for writing to a buffered file.
  170.        IMPORTANT: If PutByt is used, BufPut must be explicitly called to
  171.        flush the file before it is closed with BufClo.
  172.  
  173.      BUFFER4.ASM
  174.  
  175.        Defines:
  176.  
  177.          GetTok              read a buffer token
  178.  
  179.        Requires:
  180.  
  181.  
  182.  
  183.          BUFFER2.ASM
  184.  
  185.        The routine in this file reads a delimited token from a buffered
  186.        file.  GetTok is used by the macro library files.
  187.  
  188.      CASE1.ASM
  189.  
  190.        Defines:
  191.  
  192.          ChrLwr              convert a character to lower case
  193.          ChrUpr              convert a character to upper case
  194.  
  195.        These routines convert single characters to upper or lower case.
  196.  
  197.      CASE2.ASM
  198.  
  199.        Defines:
  200.  
  201.          StrLwr              convert a string to lower case
  202.          StrUpr              convert a string to upper case
  203.  
  204.        Requires:
  205.  
  206.          CASE1.ASM
  207.  
  208.        The routines in this file convert entire strings to upper or lower
  209.        case.
  210.  
  211.      CHECK1.ASM
  212.  
  213.        Defines:
  214.  
  215.          SumBlk              return the checksum of a block
  216.  
  217.        The routine in this file calculates the checksum of a block of data.
  218.        This routine is used in xmodem file transfers.
  219.  
  220.      CHECK2.ASM
  221.  
  222.        Defines:
  223.  
  224.          SumRes              reset the current checksum
  225.          SumCur              return the current checksum
  226.          SumUpd              update the current checksum by a byte
  227.  
  228.        The routines in this file calculate the checksum of a sequence of
  229.        bytes.  These routines perform the same function as SumBlk, but one
  230.        byte at a time.
  231.  
  232.      CHECK3.ASM
  233.  
  234.        Defines:
  235.  
  236.          CrcBlk              return the CRC of a block
  237.  
  238.        The routine in this file calculates the cyclic redundancy checksum
  239.        (CRC) of a block of data using the xmodem polynomial.  This routine
  240.        is used in xmodem file transfers.
  241.  
  242.  
  243.      CHECK4.ASM
  244.  
  245.        Defines:
  246.  
  247.          CrcRes              reset the current CRC
  248.          CrcCur              return the current CRC
  249.          CrcUpd              update the current CRC by a byte
  250.  
  251.        The routines in this file calculate the CRC of a sequence of bytes.
  252.        These routines perform the same function as CrcBlk, but one byte at
  253.        a time.
  254.  
  255.      CONVERT.ASM
  256.  
  257.        Defines:
  258.  
  259.          Num2Str             convert a 32 bit number to a string
  260.          Str2Num             convert string to a 32 bit number
  261.  
  262.        Requires:
  263.  
  264.          CASE1.ASM
  265.  
  266.        The routines in this file convert 32 bit numbers to strings and from
  267.        strings to 32 bit numbers.
  268.  
  269.      DRAW1.ASM
  270.  
  271.        Defines:
  272.  
  273.          DrwBox              draw a double line box
  274.  
  275.        Requires:
  276.  
  277.          VIDEO4.ASM
  278.          VIDEO5.ASM
  279.  
  280.        The routine in this file draws a double line box.  This is useful
  281.        when creating pop-up windows.
  282.  
  283.      ENVIRO.ASM
  284.  
  285.        Defines:
  286.  
  287.          EnvPro              get the current program path\name
  288.          EnvRes              reset the environment reader
  289.          EnvGet              return the next environment string
  290.  
  291.        The routines in this file are used to access the environment
  292.        strings.  EnvPro, which returns the name of the program, only works
  293.        with DOS version 3.0 or higher.  EnvGet returns each environment
  294.        string in sequence.  EnvRes forces EnvGet to start with the first
  295.        environment string.  EnvRes is automatically called when this file
  296.        is INCLUDEd.
  297.  
  298.      FILE.ASM
  299.  
  300.        Defines:
  301.  
  302.  
  303.          FilOpn              open an existing file
  304.          FilCre              create a new file or truncate an existing file
  305.          FilClo              close an open file
  306.          FilRea              read from a file
  307.          FilWri              write to a file
  308.          FilSee              move a file read/write pointer
  309.  
  310.          OPEN_READ           open for reading
  311.          OPEN_WRITE          open for writing
  312.          OPEN_BOTH           open for reading and writing
  313.  
  314.          ATTR_NORMAL         create normal file
  315.          ATTR_READONLY       create readonly file
  316.          ATTR_HIDDEN         create hidden file
  317.          ATTR_SYSTEM         create system file
  318.  
  319.          SEEK_FRONT          seek from beginning of file
  320.          SEEK_CURRENT        seek from current location in file
  321.          SEEK_END            seed from end of file
  322.  
  323.        The routines in this file directly read and write to files.  All
  324.        file access if performed with a file handle, returned by FilOpn or
  325.        FilCre.
  326.  
  327.      INPUT.ASM
  328.  
  329.        Defines:
  330.  
  331.          InpVer              verify something with a yes or no
  332.          InpEsc              prompt and wait for the escape key
  333.          InpStr              input a string
  334.  
  335.        Requires:
  336.  
  337.          CASE1.ASM
  338.          KEYBRD.ASM
  339.          PROMPT.ASM
  340.          VIDEO4.ASM
  341.          VIDEO5.ASM
  342.  
  343.        The routines in this file allow three types of input with prompting.
  344.  
  345.      INTR.ASM
  346.  
  347.        Defines:
  348.  
  349.          IntGet              get an interrupt vector
  350.          IntSet              set an interrupt vector
  351.  
  352.        The routines in this file get and set interrupt vector addresses.
  353.  
  354.      JUSTIFY1.ASM
  355.  
  356.        Defines:
  357.  
  358.          StrJusR             right justify a string
  359.  
  360.        Requires:
  361.  
  362.  
  363.           STRING.ASM
  364.  
  365.        The routine in this file inserts characters on the left side of a
  366.        string to make the string a specific length.  This is useful when
  367.        lining up the right edge of a column of strings.
  368.  
  369.      JUSTIFY2.ASM
  370.  
  371.        Defines:
  372.  
  373.          StrJusL             left justify a string
  374.  
  375.        Requires:
  376.  
  377.           STRING.ASM
  378.  
  379.        The routine in this file inserts characters on the right side of a
  380.        string to make the string a specific length.  This is useful when
  381.        lining up the left edge of a column of strings.
  382.  
  383.      KEYBRD.ASM
  384.  
  385.        Defines:
  386.  
  387.          KeyGet              get keystroke if available
  388.          KeyWai              wait for a keystroke
  389.          KeyRep              replace a keystroke
  390.          KeyHit              return the keyboard status
  391.          KeyClr              clear the keyboard buffer
  392.  
  393.        The routines in this file input keystrokes directly from DOS. KeyRep
  394.        does not return the keystroke to DOS, but rather stores it in a
  395.        variable so it will be returned by the other keyboard routines.
  396.        NOTE: I've encountered a DOS bug when using KeyHit and do not
  397.        recommend its use.
  398.  
  399.        Equates for many keystrokes are provided in this file.  Some
  400.        examples are: KEY_ESC, KEY_PGUP, KEY_ALT_TAB, KEY_CTL_A, KEY_ALT_F1.
  401.  
  402.      MACRO1.ASM
  403.  
  404.        Defines:
  405.  
  406.          MacAll              allocate macro code and data areas
  407.          MacRel              release macro code and data areas
  408.          MacCom              load and compile a macro
  409.          MacRes              reset the currently loaded macro
  410.          MacRun              run the currently loaded macro
  411.          MacAdr              return the address of a symbol
  412.          MacLoa              load a stack item from an external routine
  413.          MacSto              store a stack item from an external routine
  414.          MacBug              the debug flag (an 8 bit variable)
  415.  
  416.          MACRO_TOKEN         maximum token size including NUL
  417.  
  418.          MACRO_MEMORY        not enough memory for compile
  419.          MACRO_SYMBOL        out of symbol memory during compile
  420.          MACRO_CODE          out of code memory during compile
  421.  
  422.  
  423.          MACRO_LONGTOK       token too long during compile
  424.          MACRO_UNDEF         undefined symbol during compile
  425.          MACRO_BADEOF        unexpected EOF during compile
  426.          MACRO_FILE          error reading file during compile
  427.          MACRO_BADNUM        invalid number after ALLOC during compile
  428.  
  429.        Requires:
  430.  
  431.          BUFFER1.ASM
  432.          BUFFER2.ASM
  433.          BUFFER4.ASM
  434.          CONVERT.ASM
  435.          MEMORY.ASM
  436.          STACK.ASM
  437.          STRING.ASM
  438.  
  439.        The routines in this file compile and run macros.  A macro may be
  440.        run with MacRun once the code and data areas have been allocated
  441.        with MacAll and the macro compiled with MacCom.  Note that MacBug is
  442.        a byte variable, not a routine.  MacAdr will only work if MacBug is
  443.        set to non-zero before a compile.  See the file MACRO.DOC for more
  444.        information regarding macros.
  445.  
  446.      MACRO2.ASM
  447.  
  448.        Defines:
  449.  
  450.          MacUnd              return an undefined compile symbol
  451.          MacCur              return the current state (IP,stack,return)
  452.          MacStk              read values from the stack
  453.          MacRet              read values from the return stack
  454.          MacSym              return the symbol associated with an address
  455.  
  456.        Requires:
  457.  
  458.          MACRO1.ASM
  459.  
  460.        The routines in this file assist in debugging a macro.  MacUnd
  461.        fetches an undefined symbol after compiling a macro.  MacUnd and
  462.        MacSym will only work if MacBug is non-zero before a compile.  See
  463.        the file MACRO.DOC for more information regarding macros.
  464.  
  465.      MEMORY.ASM
  466.  
  467.        Defines:
  468.  
  469.          MemAll              allocate a memory block
  470.          MemRel              release a memory block
  471.  
  472.        The routines in this file allocate and deallocate system memory.
  473.        Note that START.ASM must be INCLUDEd to use these routines since COM
  474.        files do not begin with any (or much) available system memory.
  475.  
  476.      MESSAGE1.ASM
  477.  
  478.        Defines:
  479.  
  480.          MesPut              type a message to standard output
  481.  
  482.  
  483.          MesPutL             type message plus a CR/LF to standard output
  484.  
  485.        The routines in this file type messages to the standard output
  486.        device.
  487.  
  488.      MESSAGE2.ASM
  489.  
  490.        Defines:
  491.  
  492.          MesErr              type a message to error output
  493.          MesErrL             type a message plus a CR/LF to error output
  494.  
  495.        The routines in this file type messages to the standard error
  496.        device.
  497.  
  498.      PARMS.ASM
  499.  
  500.        Defines:
  501.  
  502.          ParRes              reset the parameter reader
  503.          ParGet              return the next parameter
  504.  
  505.        The routines in this file retrieve parameters from the command line.
  506.        ParGet returns each parameter in sequence.  ParRes forces ParGet to
  507.        start with the first parameter.  ParRes is automatically called when
  508.        this file is INCLUDEd.  The command line parameters must be
  509.        separated by one or more spaces.
  510.  
  511.      PROMPT.ASM
  512.  
  513.        Defines:
  514.  
  515.          ProWrt              display a prompt
  516.          ProVer              display a prompt with " (Y/N)?" appended
  517.          ProEsc              display a prompt with "  ; Press ESC" appended
  518.  
  519.        Requires:
  520.  
  521.          VIDEO4.ASM
  522.          VIDEO5.ASM
  523.  
  524.        The routines in this file display various formatted strings for the
  525.        routines in INPUT.ASM.
  526.  
  527.      RANDOM.ASM
  528.  
  529.        Defines:
  530.  
  531.          RndSed              seed the number generator
  532.          RndNum              return a random number
  533.          RndNumN             return a random number in the range 0 to N-1
  534.  
  535.        The routines in this file generate random numbers.  The random
  536.        number generator is automatically seeded when this file is INCLUDEd.
  537.        Note that a particular seed always returns the same sequence of
  538.        random numbers.
  539.  
  540.      SERIAL1.ASM
  541.  
  542.  
  543.        Defines:
  544.  
  545.          ComAll              allocate an input buffer
  546.          ComRel              release an input buffer
  547.          ComOpn              open a serial port
  548.          ComClo              close a serial port
  549.          ComClr              clear the input buffer
  550.          ComByt              return the bytes waiting in the input buffer
  551.          ComGet              read a byte from serial port
  552.          ComPut              write a byte to the serial port
  553.  
  554.          SERIAL_RECORD       bytes in serial record
  555.  
  556.          PARITY_NONE         no parity
  557.          PARITY_ODD          odd parity
  558.          PARITY_EVEN         even parity
  559.  
  560.        Requires:
  561.  
  562.          MEMORY.ASM
  563.  
  564.        The routines in this file allow data to be read from and written to
  565.        the first two serial ports.  All serial i/o is performed through a
  566.        serial record.  The serial record must exist in the current data
  567.        segment (usually declared or allocated using the StkAll macro).  All
  568.        input is interrupt driven.  The input buffer must be allocated with
  569.        ComAll and then the serial port opened with ComOpn before i/o can
  570.        take place.
  571.  
  572.        I think the maximum reliable speed using this code is 19200 bps.  On
  573.        some systems I've had trouble sending and receiving data at speeds
  574.        greater than 2400 bps.
  575.  
  576.      SERIAL2.ASM
  577.  
  578.        Defines:
  579.  
  580.          ComGetW             read a word of data from the serial port
  581.          ComPutW             write a word of data to the serial port
  582.  
  583.        Requires:
  584.  
  585.          SERIAL1.ASM
  586.  
  587.        The routines in this file transfer 16 bits at a time to and from the
  588.        serial port.
  589.  
  590.      SERIAL3.ASM
  591.  
  592.        Defines:
  593.  
  594.          ComRea              read a block of data from the serial port
  595.  
  596.        Requires:
  597.  
  598.          SERIAL1.ASM
  599.          SERIAL5.ASM
  600.  
  601.  
  602.  
  603.        The routine in the file reads a block of data from the serial port.
  604.  
  605.      SERIAL4.ASM
  606.  
  607.        Defines:
  608.  
  609.          ComWri              write a block of data to the serial port
  610.  
  611.        Requires:
  612.  
  613.          SERIAL1.ASM
  614.  
  615.        The routine in this file writes a block of data to the serial port.
  616.  
  617.      SERIAL5.ASM
  618.  
  619.        Defines:
  620.  
  621.          ComWai              wait for a byte of data from the serial port
  622.          ComWaiW             wait for a word of data from the serial port
  623.          ComAny              wait for any data from the serial port
  624.  
  625.        Requires:
  626.  
  627.          SERIAL1.ASM
  628.          SERIAL2.ASM
  629.          TICKS.ASM
  630.  
  631.        The routines in this file wait for data from the serial port.
  632.  
  633.      SERIAL6.ASM
  634.  
  635.        Defines:
  636.  
  637.          ComEmp              wait for pause in the flow of serial data
  638.  
  639.        Requires:
  640.  
  641.          SERIAL1.ASM
  642.          TICKS.ASM
  643.  
  644.        The routine in this file waits for a pause in the flow of data from
  645.        the serial port.  This routine is used in xmodem file transfers.
  646.  
  647.      SERIAL7.ASM
  648.  
  649.        Defines:
  650.  
  651.          ComRng              return the modem ring flag
  652.          ComCar              return the modem carrier flag
  653.  
  654.        Requires:
  655.  
  656.          SERIAL1.ASM
  657.  
  658.        The routines in this file return information about the modem through
  659.        the serial port.
  660.  
  661.  
  662.  
  663.      SERIAL8.ASM
  664.  
  665.        Defines:
  666.  
  667.          ComBrk              send a modem break signal
  668.          ComDtr              force the modem DTR line low
  669.  
  670.        Requires:
  671.  
  672.          SERIAL1.ASM
  673.          TICKS.ASM
  674.  
  675.        The routines in this file allow a break signal to be sent by the
  676.        modem and force the DTR line to be lowered (which causes some modems
  677.        to hang up).
  678.  
  679.      SERIAL9.ASM
  680.  
  681.        Defines:
  682.  
  683.          ComRep              store a byte to the input buffer
  684.  
  685.        Requires:
  686.  
  687.          SERIAL1.ASM
  688.  
  689.        The routine in this file stores a byte to the serial input buffer as
  690.        if the byte had been received through the serial port.  NOTE: ComRep
  691.        does not check to see if the buffer is full.  The serial interrupt
  692.        handlers do not use this routine for storing data.
  693.  
  694.      SHELL1.ASM
  695.  
  696.        Defines:
  697.  
  698.          RunPro              execute a program
  699.  
  700.        Requires:
  701.  
  702.          STACK.ASM
  703.          STRING.ASM
  704.  
  705.        The routine in this file runs another program.
  706.  
  707.      SHELL2.ASM
  708.  
  709.        Defines:
  710.  
  711.          RunSys              run a secondary command processor
  712.  
  713.        Requires:
  714.  
  715.          ENVIRO.ASM
  716.          SHELL1.ASM
  717.          STACK.ASM
  718.          STRINGF.ASM
  719.  
  720.        The routine in this program runs a secondary command processor (i.e.
  721.  
  722.  
  723.        a DOS shell).  RunSys uses the COMSPEC environment variable to find
  724.        the pathname of the command processor.
  725.  
  726.      SHIFT.ASM
  727.  
  728.        Defines:
  729.  
  730.          KeyShf              return shift state
  731.  
  732.          KEY_RIGHT_SHIFT     the right shift is pressed
  733.          KEY_LEFT_SHIFT      the left shift is pressed
  734.          KEY_CTRL            a control key is pressed
  735.          KEY_ALT             an alternate key is pressed
  736.          KEY_LEFT_CTRL       the left control key is pressed
  737.          KEY_LEFT_ALT        the left alternate key is pressed
  738.  
  739.        The routine in this file returns the current shift state.
  740.  
  741.      SOUND.ASM
  742.  
  743.        Defines:
  744.  
  745.          SndOn               turn the speaker on
  746.          SndOff              turn the speaker off
  747.  
  748.        The routines in this file turn the speaker on or off at specific
  749.        hertz frequencies.
  750.  
  751.      STACK.ASM
  752.  
  753.        Defines:
  754.  
  755.          StkAll              allocate stack memory (macro)
  756.          StkRel              release stack memory (macro)
  757.  
  758.        The macros in this file allocate memory from the stack.  Adequate
  759.        stack memory must be available for these macros and all instructions
  760.        that use the stack (like PUSH's, CALL's, and INT's).  StkAll
  761.        allocates memory by subtracting the bytes to allocate from SP and
  762.        then storing SP to a register or variable.  StkRel releases the
  763.        memory by adding the bytes back to SP.  The bytes allocated and
  764.        released must always match.  Memory allocated within a routine must
  765.        be released before the routine returns.  Registers may be pushed and
  766.        popped outside, around, or within a StkAll/StkRel pair, but may not
  767.        cross a StkAll/StkRel boundary:
  768.  
  769.          ; this code is okay
  770.  
  771.          push ax        ;-- push/pop, outside
  772.          pop ax         ;
  773.          push bx                   ;----------;-- push/pop, around
  774.          StkAll di, 10                        ;
  775.          push cx        ;-- push/pop, within  ;
  776.          pop cx         ;                     ;
  777.          StkRel 10                            ;
  778.          pop bx                    ;----------;
  779.  
  780.  
  781.  
  782.          ; this code is NOT okay
  783.  
  784.          push ax        ;--;-- push/pop, crosses boundary
  785.          StkAll di, 10     ;
  786.          pop ax         ;--;
  787.          StkRel 10
  788.  
  789.        DS must equal SS when accessing memory allocated with StkAll.
  790.  
  791.      START.ASM
  792.  
  793.        Defines:
  794.  
  795.          STACK_SIZE          bytes reserved for stack
  796.  
  797.        This file contains standard COM program startup code.  The startup
  798.        code checks that the DOS version is 2.0 or higher and reduces the
  799.        system memory allocation to a minimum while reserving a specific
  800.        amount of memory for the stack.  The startup code will terminate the
  801.        program if an improper version of DOS is running or insufficient
  802.        memory is available.
  803.  
  804.      STRING.ASM
  805.  
  806.        Defines:
  807.  
  808.          StrLen              return the length of a string
  809.          StrCpy              copy a string
  810.          StrCmp              compare two strings
  811.  
  812.        The routines in this file provide three commonly used string
  813.        routines.
  814.  
  815.      STRINGF.ASM
  816.  
  817.        Defines:
  818.  
  819.          StrLenF             return the length of a far string
  820.          StrCpyF             copy a far string
  821.          StrCmpF             compare two far strings
  822.  
  823.        The routines in this file provide three commonly used string
  824.        routines.  These routines are identical to the routines in
  825.        STRING.ASM except the string addresses consist of a segment and
  826.        offset (instead of only an offset).  These routines are used to
  827.        access strings that are in another segment.
  828.  
  829.      TICKS.ASM
  830.  
  831.        Defines:
  832.  
  833.          TicSys              return the current system time
  834.          TicRes              reset a timer
  835.          TicPas              return the ticks since a timer was reset
  836.          TicWai              do nothing for a tick duration
  837.  
  838.          TICK_TIMERS         number of timers
  839.  
  840.  
  841.  
  842.        The routines in this file measure time.  The unit of measurement is
  843.        "ticks," which occur about 18.2 times a second.  There are several
  844.        independent timers available.  Timers 0 and 1 may be used (i.e.
  845.        reset) by the library routines.  Since the timer routines return 16-
  846.        bit values, only an hour's worth of ticks can be measured (65535 /
  847.        18.2 seconds).  All the timers are automatically reset when this
  848.        file is INCLUDEd.
  849.  
  850.      TSR1.ASM
  851.  
  852.        Defines:
  853.  
  854.          Keep                install TSR
  855.  
  856.        The macro in this file terminates a program and makes it resident.
  857.        The user must define a symbol TSR_END, which marks the end of the
  858.        resident code.  The code and data after TSR_END is usually part of
  859.        the TSR installation code.
  860.  
  861.      TSR2.ASM
  862.  
  863.        Defines:
  864.  
  865.          Trap21              hook interrupt 21
  866.          Free21              release interrupt 21
  867.          Okay21              verify interrupt 21
  868.          Query               query resident TSR
  869.  
  870.        Requires:
  871.  
  872.          INTR.ASM
  873.  
  874.        The macros in this file hook and release interrupt 21H.  This
  875.        interrupt is used to communicate with a resident copy of the
  876.        program.  The user must define: TSR_ID1, TSR_ID2, and TsrUsr.
  877.        TSR_ID1 and TSR_ID2 are 16 bit values that should be unique among
  878.        all installed TSR's.  The value of TSR_ID1 must be greater than 3000
  879.        (decimal).  TsrUsr defines a table of Query codes and associated TSR
  880.        functions.  The format of TsrUsr is:
  881.  
  882.          TsrUsr LABEL BYTE
  883.            DB code, OFFSET routine
  884.            DB code, OFFSET routine
  885.            DB 0
  886.  
  887.        'code' is a one byte, non-zero code used by Query and 'routine' is
  888.        the procedure associated with the code.  The routines to service the
  889.        codes can return values in all registers except AX, DS, and ES.  No
  890.        registers need to be preserved.  Once the TSR is installed, you can
  891.        interface with it by using the Query macro:
  892.  
  893.            Query 1
  894.  
  895.        This statement will call the routine associated with code 1.  These
  896.        macros are used for things like disabling a TSR, determining if a
  897.        TSR is installed, and retrieving the segement of a TSR for
  898.        uninstalling it.
  899.  
  900.  
  901.  
  902.      TSR3.ASM
  903.  
  904.        Defines:
  905.  
  906.          Trap16              hook interrupt 16
  907.          Free16              release interrupt 16
  908.          Okay16              verify interrupt 16
  909.  
  910.        Requires:
  911.  
  912.          INTR.ASM
  913.          SHIFT.ASM
  914.  
  915.        The macros in this file allow a TSR to be invoked with a keystroke
  916.        sequence.  The user must define TSR_SHIFT and TsrKey.  TSR_SHIFT
  917.        should be equated to the shift keys (as defined in SHIFT.ASM) that
  918.        must be pressed to invoke the TSR.  TsrKey defines the table of
  919.        keystokes and associated TSR functions.  The format of TsrKey is:
  920.  
  921.          TsrKey LABEL BYTE
  922.            DW code, OFFSET routine
  923.            DW code, OFFSET routine
  924.            DW 0
  925.  
  926.        'code' is a 16 bit keystroke code returned by INT 16 and 'routine'
  927.        is the procedure associated with the keystroke.  You will need some
  928.        sort of BIOS reference to look up the key codes returned by INT 16.
  929.  
  930.        Note that this manner of invoking TSR's (via interrupt 16) does not
  931.        allow DOS functions to be used.  I/O can be performed through the
  932.        BIOS.  The biggest disadvantage of the DOS restriction is that disk
  933.        files cannot be accessed.
  934.  
  935.      VIDEO1.ASM
  936.  
  937.        Defines:
  938.  
  939.          ModDim              return the screen dimensions
  940.          ModGet              return the current mode
  941.          VidInit             initialize the video routines
  942.  
  943.          TEXT4012            40 x 12 mode (color VGA)
  944.          TEXT4014            40 x 14 mode (color VGA)
  945.          TEXT4021            40 x 21 mode (color VGA)
  946.          TEXT4025            40 x 25 mode (CGA, color EGA, color VGA)
  947.          TEXT4028            40 x 28 mode (color VGA)
  948.          TEXT4043            40 x 43 mode (color EGA, color VGA)
  949.          TEXT4050            40 x 50 mode (color VGA)
  950.          TEXT8012            80 x 12 mode (color VGA)
  951.          TEXT8014            80 x 14 mode (color VGA)
  952.          TEXT8021            80 x 21 mode (VGA)
  953.          TEXT8025            80 x 25 mode (all adapters)
  954.          TEXT8028            80 x 28 mode (VGA)
  955.          TEXT8043            80 x 43 mode (EGA, VGA)
  956.          TEXT8050            80 x 50 mode (VGA)
  957.  
  958.        The routines in this file initialize and provide global support for
  959.        the direct video routines.  VidInit must be called before the video
  960.  
  961.  
  962.        routines in VIDEO3.ASM through VIDEO9.ASM are used.  Only text modes
  963.        are supported.  The adapter must be in a valid text mode before
  964.        running VidInit.  If the state of the adapter is uncertain, use the
  965.        routines VidOpn and VidClo in VIDEO2.ASM instead of VidInit.
  966.  
  967.        The video routines may not work on some systems if the video page is
  968.        non-zero when VidInit is called.  This occurs on systems that use a
  969.        non-compatible video page addressing scheme.
  970.  
  971.        VidInit attempts to save the cursor appearance when turning the
  972.        cursor on and off.  On some systems this feature will not work
  973.        properly because the ROM does not always return the correct cursor
  974.        type.  If turning the cursor on and off (using CurSet in VIDEO4.ASM)
  975.        changes the appearance of the cursor, you might be able to fix the
  976.        problem by using CurFix in VIDEO9.ASM.
  977.  
  978.      VIDEO2.ASM
  979.  
  980.        Defines:
  981.  
  982.          VidTyp              return the adapter type
  983.          ModSet              switch to a mode
  984.          VidOpn              initialize the video routines
  985.          VidClo              uninitialize the video routines
  986.  
  987.          MDA                 monochrome display adapter
  988.          CGAMON              color graphics adapter (monochrome)
  989.          CGACOL              color graphics adapter
  990.          EGAMON              enhanced graphics adapter, monochrome
  991.          EGACOL              enhanced graphics adapter, color
  992.          VGAMON              video graphics array, monochrome
  993.          VGACOL              video graphics array, color
  994.          MCGAMON             multi-color graphics adapter, monochrome
  995.          MCGACOL             multi-color graphics adapter, color
  996.  
  997.        Requires:
  998.  
  999.          VIDEO1.ASM
  1000.  
  1001.        The routines in this file support video mode switching.  The
  1002.        routines VidOpn save the current video mode, switch to a valid text
  1003.        mode, and initialize the video routines.  VidClo restores the saved
  1004.        video mode.
  1005.  
  1006.      VIDEO3.ASM
  1007.  
  1008.        Defines:
  1009.  
  1010.          AtrSet              set the current attribute
  1011.          AtrGet              return the current attribute
  1012.          AtrFor              set the current foreground
  1013.          AtrBac              set the current background
  1014.  
  1015.          BLACK               black attribute
  1016.          BLUE                blue attribute
  1017.          GREEN               green attribute
  1018.          CYAN                cyan attribute
  1019.          RED                 red attribute
  1020.  
  1021.  
  1022.          MAGENTA             magenta attribute
  1023.          BROWN               brown attribute
  1024.          WHITE               white (gray) attribute
  1025.          BOLD                bold attribute
  1026.          BLINK               blink attribute
  1027.  
  1028.        Requires:
  1029.  
  1030.          VIDEO1.ASM
  1031.  
  1032.        The routines in this file get and set the attribute used in
  1033.        displaying output to the screen.  The initial attribute is read from
  1034.        the screen.  AtrGet and AtrSet work with a combined foreground and
  1035.        background attribute.  In a combined attribute, the foreground and
  1036.        background colors are stored in the first three bits of the lower
  1037.        and upper nibble of the attribute byte.  Colors can be combined into
  1038.        an attribute bytes as follows:
  1039.  
  1040.          mov al, (WHITE * 16) OR BLACK       ;back=WHITE, fore=BLACK
  1041.          call AtrSet                         ;set attribute
  1042.  
  1043.        Foreground and background colors can also be set separately with
  1044.        AtrFor and AtrBac.  The colors BLACK through WHITE can be used as
  1045.        either foreground or background colors.  BOLD and BLINK are
  1046.        characteristics that affect the entire attribute and must be
  1047.        combined with a foreground, background, or attribute byte using an
  1048.        OR.
  1049.  
  1050.      VIDEO4.ASM
  1051.  
  1052.        Defines:
  1053.  
  1054.          CurGet              return the cursor on/off state
  1055.          CurSet              turn the cursor on or off
  1056.          CurCol              return the current column
  1057.          CurRow              return the current row
  1058.          CurPos              return the current column and row
  1059.          CurMov              move the cursor to a location
  1060.          CurAdv              advance the cursor
  1061.  
  1062.        Requires:
  1063.  
  1064.          VIDEO1.ASM
  1065.  
  1066.        The routines in this file handle cursor positioning.  CurAdv moves
  1067.        the cursor toward the right edge of the screen by the number of
  1068.        characters last displayed by one of the routines in VIDEO5.ASM. Note
  1069.        that the cursor does not wrap around to the next line when the edge
  1070.        of the screen is reached.
  1071.  
  1072.      VIDEO5.ASM
  1073.  
  1074.        Defines:
  1075.  
  1076.          WrtChr              write a character
  1077.          WrtChrs             write multiple characters
  1078.          WrtStr              write a string
  1079.          WrtStrc             write a string with length
  1080.  
  1081.  
  1082.        Requires:
  1083.  
  1084.          VIDEO1.ASM
  1085.  
  1086.        The routines in this file writes characters and strings to the
  1087.        screen.
  1088.  
  1089.      VIDEO6.ASM
  1090.  
  1091.        Defines:
  1092.  
  1093.          ScrCls              clear the entire screen
  1094.          ScrClr              clear a screen area
  1095.          ScrPut              copy a screen area to memory
  1096.          ScrGet              copy memory to a screen area
  1097.          ScrSiz              return the bytes required for a screen area
  1098.  
  1099.        Requires:
  1100.  
  1101.          VIDEO1.ASM
  1102.  
  1103.        The routines in this file clears and copies portions of the screen.
  1104.  
  1105.      VIDEO7.ASM
  1106.  
  1107.        Defines:
  1108.  
  1109.          ScrCpy              copy a screen area to a new location
  1110.  
  1111.        Requires:
  1112.  
  1113.          VIDEO1.ASM
  1114.  
  1115.        The routine in this file copies areas of the screen to new areas of
  1116.        the screen.  ScrCpy can be used to scroll the screen.
  1117.  
  1118.      VIDEO8.ASM
  1119.  
  1120.        Defines:
  1121.  
  1122.          VidCol              determine if the adapter supports color
  1123.  
  1124.        Requires:
  1125.  
  1126.          VIDEO2.ASM
  1127.  
  1128.        The routine in this file determines if the adapter supports color.
  1129.        This is can be important for applications that must run on both
  1130.        color and monochrome adapters.
  1131.  
  1132.      VIDEO9.ASM
  1133.  
  1134.        Defines:
  1135.  
  1136.          CurFix              force standard underline cursor
  1137.  
  1138.        Requires:
  1139.  
  1140.  
  1141.  
  1142.          VIDEO1.ASM
  1143.          VIDEO2.ASM
  1144.          VIDEO4.ASM
  1145.  
  1146.        The routine in this file tries to make the cursor to appear as a
  1147.        blinking underline.  Though VidInit attempts to preserve the cursor
  1148.        appearance, not all systems return the correct cursor type.  Use
  1149.        CurFix to correct an odd looking cursor.  CurFix should be used
  1150.        after running VidInit or VidOpn.  CurFix will only work in 80 column
  1151.        by 25 row mode.
  1152.  
  1153.      XMODEM1.ASM
  1154.  
  1155.        Defines:
  1156.  
  1157.          XmdPutH             send an xmodem handshake
  1158.          XmdPut              send an xmodem block
  1159.          XmdRep              wait for an xmodem reply
  1160.          XmdGetH             receive an xmodem handshake
  1161.          XmdGet              receive an xmodem block
  1162.          XmdClr              clear the input pipe
  1163.  
  1164.          XMODEM_128          received a 128 byte block
  1165.          XMODEM_1024         received a 1024 byte block
  1166.          XMODEM_TIME         timeout error
  1167.          XMODEM_HEADER       bad block header
  1168.          XMODEM_NUMBER       block number error
  1169.          XMODEM_LAST         last block number
  1170.          XMODEM_WRONG        wrong block number
  1171.          XMODEM_CHECK        checksum error
  1172.          XMODEM_REPLY        bad reply
  1173.          XMODEM_NAKED        remote error (NAK)
  1174.          XMODEM_END          end of file (EOT)
  1175.  
  1176.          XMODEM_CRC          use 16 bit CRC (otherwise 8 bit checksum)
  1177.          XMODEM_BIG          use 1024 byte blocks (otherwise 128 bytes)
  1178.          XMODEM_FAST         use fast timer values (otherwise slow)
  1179.  
  1180.          XMODEM_SOH          start of 128 byte block constant
  1181.          XMODEM_STX          start of 1024 byte block constant
  1182.          XMODEM_ACK          acknowledge constant
  1183.          XMODEM_NAK          negative acknowledge constant
  1184.          XMODEM_EOT          end of transmission constant
  1185.  
  1186.        Requires:
  1187.  
  1188.          CHECK1.ASM
  1189.          CHECK3.ASM
  1190.          SERIAL1.ASM
  1191.          SERIAL2.ASM
  1192.          SERIAL3.ASM
  1193.          SERIAL4.ASM
  1194.          SERIAL5.ASM
  1195.          SERIAL6.ASM
  1196.  
  1197.        The routines in this file provide xmodem file transfer primitives.
  1198.  
  1199.      XMODEM2.ASM
  1200.  
  1201.  
  1202.        Defines:
  1203.  
  1204.          XmdUpl              upload a file
  1205.          XmdDwn              download a file
  1206.  
  1207.          XMODEM_MEMORY       not enough memory to perform transfer
  1208.          XMODEM_FILE         error read or writing file during transfer
  1209.          XMODEM_ABORT        transfer was aborted
  1210.  
  1211.        Requires:
  1212.  
  1213.          BUFFER1.ASM
  1214.          BUFFER2.ASM
  1215.          BUFFER3.ASM
  1216.          SERIAL1.ASM
  1217.          STACK.ASM
  1218.          XMODEM1.ASM
  1219.  
  1220.        The routines in this file implement full xmodem file transfers.  The
  1221.        result XMODEM_FILE is usually returned when the file cannot be
  1222.        opened or the disk being full.  A special NEAR procedure called
  1223.        XmdUsr must be written by the user.  XmdUsr is called by both XmdUpl
  1224.        and XmdDwn.  XmdUsr allows a program to check the current status and
  1225.        abort the transfer.
  1226.  
  1227.        The registers upon entering XmdUsr are:
  1228.  
  1229.          AL= flags
  1230.            bits 8 and 7 -
  1231.              00 handshake
  1232.              01 waiting for block
  1233.              10 waiting for reply
  1234.            bits 6 to 0 -
  1235.              xmodem flags (XMODEM_BIG, XMODEM_FAST, XMODEM_CRC)
  1236.          AH= last result code
  1237.          BX= total number of errors
  1238.          DX:CX= total bytes transferred
  1239.  
  1240.        On exiting, XmdUsr should set the carry flag if the transfer should
  1241.        abort, or clear the carry flag if the transfer should continue.
  1242.  
  1243.                                 LIBRARY ROUTINES
  1244.                                 ----------------
  1245.  
  1246.      AtrBac   VIDEO3.ASM    set the current background
  1247.      AtrFor   VIDEO3.ASM    set the current foreground
  1248.      AtrGet   VIDEO3.ASM    return the current attribute
  1249.      AtrSet   VIDEO3.ASM    set the current attribute
  1250.      BufAll   BUFFER1.ASM   allocate a buffer
  1251.      BufClo   BUFFER1.ASM   close a buffer file
  1252.      BufGet   BUFFER2.ASM   read an entire buffer
  1253.      BufOpn   BUFFER1.ASM   open a buffer file
  1254.      BufRel   BUFFER1.ASM   release a buffer
  1255.      BufPut   BUFFER3.ASM   write an entire buffer
  1256.      ChrLwr   CASE1.ASM     convert a character to lower case
  1257.      ChrUpr   CASE1.ASM     convert a character to upper case
  1258.      ComAll   SERIAL1.ASM   allocate an input buffer
  1259.      ComAny   SERIAL5.ASM   wait for any data from the serial port
  1260.  
  1261.  
  1262.      ComBrk   SERIAL8.ASM   send a modem break signal
  1263.      ComByt   SERIAL1.ASM   return the bytes waiting in the input buffer
  1264.      ComCar   SERIAL7.ASM   return the modem carrier flag
  1265.      ComClo   SERIAL1.ASM   close a serial port
  1266.      ComClr   SERIAL1.ASM   clear the input buffer
  1267.      ComDtr   SERIAL8.ASM   force the modem DTR line low
  1268.      ComEmp   SERIAL6.ASM   wait for pause in the flow of serial data
  1269.      ComGet   SERIAL1.ASM   read a byte from serial port
  1270.      ComGetW  SERIAL2.ASM   read a word of data from the serial port
  1271.      ComOpn   SERIAL1.ASM   open a serial port
  1272.      ComPut   SERIAL1.ASM   write a byte to the serial port
  1273.      ComPutW  SERIAL2.ASM   write a word of data to the serial port
  1274.      ComRea   SERIAL3.ASM   read a block of data from the serial port
  1275.      ComRel   SERIAL1.ASM   release an input buffer
  1276.      ComRep   SERIAL9.ASM   store a byte to the input buffer
  1277.      ComRng   SERIAL7.ASM   return the modem ring flag
  1278.      ComWai   SERIAL5.ASM   wait for a byte of data from the serial port
  1279.      ComWaiW  SERIAL5.ASM   wait for a word of data from the serial port
  1280.      ComWri   SERIAL4.ASM   write a block of data to the serial port
  1281.      CrcBlk   CHECK3.ASM    return the CRC of a block
  1282.      CrcCur   CHECK4.ASM    return the current CRC
  1283.      CrcRes   CHECK4.ASM    reset the current CRC
  1284.      CrcUpd   CHECK4.ASM    update the current CRC by a byte
  1285.      CurAdv   VIDEO4.ASM    advance the cursor
  1286.      CurCol   VIDEO4.ASM    return the current column
  1287.      CurFix   VIDEO9.ASM    force standard underline cursor
  1288.      CurGet   VIDEO4.ASM    return the cursor on/off state
  1289.      CurMov   VIDEO4.ASM    move the cursor to a location
  1290.      CurPos   VIDEO4.ASM    return the current column and row
  1291.      CurRow   VIDEO4.ASM    return the current row
  1292.      CurSet   VIDEO4.ASM    turn the cursor on or off
  1293.      DrwBox   DRAW1.ASM     draw a double line box
  1294.      EnvGet   ENVIRO.ASM    return the next environment string
  1295.      EnvPro   ENVIRO.ASM    get the current program path\name
  1296.      EnvRes   ENVIRO.ASM    reset the environment reader
  1297.      FilClo   FILE.ASM      close an open file
  1298.      FilCre   FILE.ASM      create a new file or truncate an existing file
  1299.      FilOpn   FILE.ASM      open an existing file
  1300.      FilRea   FILE.ASM      read from a file
  1301.      FilSee   FILE.ASM      move a file read/write pointer
  1302.      FilWri   FILE.ASM      write to a file
  1303.      Free16   TSR3.ASM      release interrupt 16
  1304.      Free21   TSR2.ASM      release interrupt 21
  1305.      GetByt   BUFFER2.ASM   read a buffer byte
  1306.      GetTok   BUFFER4.ASM   read a buffer token
  1307.      InpEsc   INPUT.ASM     prompt and wait for the escape key
  1308.      InpStr   INPUT.ASM     input a string
  1309.      InpVer   INPUT.ASM     verify something with a yes or no
  1310.      IntGet   INTR.ASM      get an interrupt vector
  1311.      IntSet   INTR.ASM      set an interrupt vector
  1312.      Keep     TSR1.ASM      install TSR
  1313.      KeyClr   KEYBRD.ASM    clear the keyboard buffer
  1314.      KeyGet   KEYBRD.ASM    get keystroke if available
  1315.      KeyHit   KEYBRD.ASM    return the keyboard status
  1316.      KeyRep   KEYBRD.ASM    replace a keystroke
  1317.      KeyShf   SHIFT.ASM     return shift state
  1318.      KeyWai   KEYBRD.ASM    wait for a keystroke
  1319.      MacAdr   MACRO1.ASM    return the address of a symbol
  1320.  
  1321.  
  1322.      MacAll   MACRO1.ASM    allocate macro code and data areas
  1323.      MacBug   MACRO1.ASM    the debug flag (an 8 bit variable)
  1324.      MacCom   MACRO1.ASM    load and compile a macro
  1325.      MacCur   MACRO2.ASM    return the current state (IP,stack,return)
  1326.      MacLoa   MACRO1.ASM    load a stack item from an external routine
  1327.      MacRel   MACRO1.ASM    release macro code and data areas
  1328.      MacRes   MACRO1.ASM    reset the currently loaded macro
  1329.      MacRet   MACRO2.ASM    read values from the return stack
  1330.      MacRun   MACRO1.ASM    run the currently loaded macro
  1331.      MacStk   MACRO2.ASM    read values from the stack
  1332.      MacSto   MACRO1.ASM    store a stack item from an external routine
  1333.      MacSym   MACRO2.ASM    return the symbol associated with an address
  1334.      MacUnd   MACRO2.ASM    return an undefined compile symbol
  1335.      MemAll   MEMORY.ASM    allocate a memory block
  1336.      MemRel   MEMORY.ASM    release a memory block
  1337.      MesErr   MESSAGE2.ASM  display a message to error output
  1338.      MesErrL  MESSAGE2.ASM  display a message and CR/LF to error output
  1339.      MesPut   MESSAGE1.ASM  display a message to standard output
  1340.      MesPutL  MESSAGE1.ASM  display a message and CR/LF to standard output
  1341.      ModDim   VIDEO1.ASM    return the screen dimensions
  1342.      ModGet   VIDEO1.ASM    return the current mode
  1343.      ModSet   VIDEO2.ASM    switch to a mode
  1344.      Okay16   TSR3.ASM      verify interrupt 16
  1345.      Okay21   TSR2.ASM      verify interrupt 21
  1346.      ParGet   PARMS.ASM     return the next parameter
  1347.      ParRes   PARMS.ASM     reset the parameter reader
  1348.      ProEsc   PROMPT.ASM    display a prompt with "  ; Press ESC" appended
  1349.      ProVer   PROMPT.ASM    display a prompt with " (Y/N)?" appended
  1350.      ProWrt   PROMPT.ASM    display a prompt
  1351.      PutByt   BUFFER3.ASM   write a buffer byte
  1352.      Query    TSR2.ASM      query resident TSR
  1353.      RndNum   RANDOM.ASM    return a random number
  1354.      RndNumN  RANDOM.ASM    return a random number in the range 0 to N-1
  1355.      RndSed   RANDOM.ASM    seed the number generator
  1356.      RunPro   SHELL1.ASM    execute a program
  1357.      RunSys   SHELL2.ASM    run a secondary command processor
  1358.      ScrClr   VIDEO6.ASM    clear a screen area
  1359.      ScrCls   VIDEO6.ASM    clear the entire screen
  1360.      ScrCpy   VIDEO7.ASM    copy a screen area to a new location
  1361.      ScrGet   VIDEO6.ASM    copy memory to a screen area
  1362.      ScrPut   VIDEO6.ASM    copy a screen area to memory
  1363.      ScrSiz   VIDEO6.ASM    return the bytes required for a screen area
  1364.      SndOff   SOUND.ASM     turn the speaker off
  1365.      SndOn    SOUND.ASM     turn the speaker on
  1366.      StkAll   STACK.ASM     allocate stack memory
  1367.      StkRel   STACK.ASM     release stack memory
  1368.      StrCmp   STRING.ASM    compare two strings
  1369.      StrCmpF  STRINGF.ASM   compare two far strings
  1370.      StrCpy   STRING.ASM    copy a string
  1371.      StrCpyF  STRINGF.ASM   copy a far string
  1372.      StrJusL  JUSTIFY2.ASM  left justify a string
  1373.      StrJusR  JUSTIFY1.ASM  right justify a string
  1374.      StrLen   STRING.ASM    return the length of a string
  1375.      StrLenF  STRINGF.ASM   return the length of a far string
  1376.      StrLwr   CASE2.ASM     convert a string to lower case
  1377.      StrUpr   CASE2.ASM     convert a string to upper case
  1378.      SumBlk   CHECK1.ASM    return the checksum of a block
  1379.      SumCur   CHECK2.ASM    return the current checksum
  1380.  
  1381.  
  1382.      SumRes   CHECK2.ASM    reset the current checksum
  1383.      SumUpd   CHECK2.ASM    update the current checksum by a byte
  1384.      TicPas   TICKS.ASM     return the ticks since a timer was reset
  1385.      TicRes   TICKS.ASM     reset a timer
  1386.      TicSys   TICKS.ASM     return the current system time
  1387.      TicWai   TICKS.ASM     do nothing for a tick duration
  1388.      Trap16   TSR3.ASM      hook interrupt 16
  1389.      Trap21   TSR2.ASM      hook interrupt 21
  1390.      VidClo   VIDEO2.ASM    uninitialize the video routines
  1391.      VidCol   VIDEO8.ASM    determine if the adapter supports color
  1392.      VidInit  VIDEO1.ASM    initialize the video routines
  1393.      VidOpn   VIDEO2.ASM    initialize the video routines
  1394.      VidTyp   VIDEO2.ASM    return the adapter type
  1395.      WrtChr   VIDEO5.ASM    write a character
  1396.      WrtChrs  VIDEO5.ASM    write multiple characters
  1397.      WrtStr   VIDEO5.ASM    write a string
  1398.      WrtStrc  VIDEO5.ASM    write a string with length
  1399.      XmdClr   XMODEM1.ASM   clear the input pipe
  1400.      XmdDwn   XMODEM2.ASM   download a file
  1401.      XmdGet   XMODEM1.ASM   receive an xmodem handshake
  1402.      XmdGetH  XMODEM1.ASM   receive an xmodem handshake
  1403.      XmdPut   XMODEM1.ASM   send an xmodem handshake
  1404.      XmdPutH  XMODEM1.ASM   send an xmodem handshake
  1405.      XmdRep   XMODEM1.ASM   wait for an xmodem reply
  1406.      XmdUpl   XMODEM2.ASM   upload a file
  1407.